<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, height=device-height, initial-scale=1, user-scalable=no">
  <meta name="description" content="API docs for the TRTCCloudListener enum from the trtc_cloud_listener library, for the Dart programming language.">
  <title>TRTCCloudListener enum - trtc_cloud_listener library - Dart API</title>


  
  <link rel="preconnect" href="https://fonts.gstatic.com">
  <link href="https://fonts.googleapis.com/css2?family=Roboto+Mono:ital,wght@0,300;0,400;0,500;0,700;1,400&display=swap" rel="stylesheet">
  <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
  
  <link rel="stylesheet" href="../static-assets/github.css?v1">
  <link rel="stylesheet" href="../static-assets/styles.css?v1">
  <link rel="icon" href="../static-assets/favicon.png?v1">

  
</head>


<body data-base-href="../"
      data-using-base-href="false">

<div id="overlay-under-drawer"></div>

<header id="title">
  <button id="sidenav-left-toggle" type="button">&nbsp;</button>
  <ol class="breadcrumbs gt-separated dark hidden-xs">
    <li><a href="../index.html">tencent_trtc_cloud</a></li>
    <li><a href="../trtc_cloud_listener/trtc_cloud_listener-library.html">trtc_cloud_listener</a></li>
    <li class="self-crumb">TRTCCloudListener enum</li>
  </ol>
  <div class="self-name">TRTCCloudListener</div>
  <form class="search navbar-right" role="search">
    <input type="text" id="search-box" autocomplete="off" disabled class="form-control typeahead" placeholder="Loading search...">
  </form>
</header>

<main>


  <div id="dartdoc-main-content" class="main-content">
      <div>
<h1><span class="kind-enum">TRTCCloudListener</span> enum 
    <a href="https://dart.dev/null-safety" class="feature feature-null-safety" title="Supports the null safety language feature.">Null safety</a>
 
</h1></div>

    
<section class="desc markdown">
  <p>监听器类型枚举</p>
</section>



    <section class="summary offset-anchor" id="constants">
      <h2>Constants</h2>

      <dl class="properties">
        <dt id="onCameraDidReady" class="constant">
  <span class="name ">onCameraDidReady</span>
  <span class="signature">&#8594; const <a href="../trtc_cloud_listener/TRTCCloudListener-class.html">TRTCCloudListener</a></span>
  

</dt>
<dd>
  <p>摄像头准备就绪。</p> 
  

  <div>
    <span class="signature"><code>const TRTCCloudListener(23)</code></span>
  </div>
</dd>

        <dt id="onConnectionLost" class="constant">
  <span class="name ">onConnectionLost</span>
  <span class="signature">&#8594; const <a href="../trtc_cloud_listener/TRTCCloudListener-class.html">TRTCCloudListener</a></span>
  

</dt>
<dd>
  <p>SDK 跟服务器的连接断开</p> 
  

  <div>
    <span class="signature"><code>const TRTCCloudListener(19)</code></span>
  </div>
</dd>

        <dt id="onConnectionRecovery" class="constant">
  <span class="name ">onConnectionRecovery</span>
  <span class="signature">&#8594; const <a href="../trtc_cloud_listener/TRTCCloudListener-class.html">TRTCCloudListener</a></span>
  

</dt>
<dd>
  <p>SDK 跟服务器的连接恢复。</p> 
  

  <div>
    <span class="signature"><code>const TRTCCloudListener(21)</code></span>
  </div>
</dd>

        <dt id="onConnectOtherRoom" class="constant">
  <span class="name ">onConnectOtherRoom</span>
  <span class="signature">&#8594; const <a href="../trtc_cloud_listener/TRTCCloudListener-class.html">TRTCCloudListener</a></span>
  

</dt>
<dd>
  <p>请求跨房通话（主播 PK）的结果回调</p>
<p>调用 TRTCCloud 中的 connectOtherRoom() 接口会将两个不同房间中的主播拉通视频通话，也就是所谓的“主播PK”功能。 调用者会收到 onConnectOtherRoom() 回调来获知跨房通话是否成功， 如果成功，两个房间中的所有用户都会收到 PK 主播的 onUserVideoAvailable() 回调。</p>
<p>参数param：</p>
<p>userId	要 PK 的目标主播 userid。</p>
<p>errCode 错误码，ERR_NULL 代表切换成功，其他请参见<a href="https://cloud.tencent.com/document/product/647/32257">错误码</a>。</p>
<p>errMsg 错误信息</p> 
  

  <div>
    <span class="signature"><code>const TRTCCloudListener(7)</code></span>
  </div>
</dd>

        <dt id="onDeviceChange" class="constant">
  <span class="name ">onDeviceChange</span>
  <span class="signature">&#8594; const <a href="../trtc_cloud_listener/TRTCCloudListener-class.html">TRTCCloudListener</a></span>
  

</dt>
<dd>
  <p>本地设备通断回调</p>
<p>注意：该回调仅支持windows和Mac平台</p>
<p>参数</p>
<p>deviceId	设备 ID</p>
<p>type 设备类型</p>
<p>state 事件类型</p> 
  

  <div>
    <span class="signature"><code>const TRTCCloudListener(42)</code></span>
  </div>
</dd>

        <dt id="onDisConnectOtherRoom" class="constant">
  <span class="name ">onDisConnectOtherRoom</span>
  <span class="signature">&#8594; const <a href="../trtc_cloud_listener/TRTCCloudListener-class.html">TRTCCloudListener</a></span>
  

</dt>
<dd>
  <p>结束跨房通话（主播 PK）的结果回调</p> 
  

  <div>
    <span class="signature"><code>const TRTCCloudListener(8)</code></span>
  </div>
</dd>

        <dt id="onEnterRoom" class="constant">
  <span class="name ">onEnterRoom</span>
  <span class="signature">&#8594; const <a href="../trtc_cloud_listener/TRTCCloudListener-class.html">TRTCCloudListener</a></span>
  

</dt>
<dd>
  <p>已加入房间的回调</p>
<p>调用 TRTCCloud 中的 enterRoom() 接口执行进房操作后，会收到来自 SDK 的 onEnterRoom(result) 回调：</p>
<p>如果加入成功，result 会是一个正数（result &gt; 0），代表加入房间的时间消耗，单位是毫秒（ms）。</p>
<p>如果加入失败，result 会是一个负数（result &lt; 0），代表进房失败的错误码。</p>
<p>参数param：</p>
<p>result &gt; 0 时为进房耗时（ms），result &lt; 0 时为进房错误码</p> 
  

  <div>
    <span class="signature"><code>const TRTCCloudListener(2)</code></span>
  </div>
</dd>

        <dt id="onError" class="constant">
  <span class="name ">onError</span>
  <span class="signature">&#8594; const <a href="../trtc_cloud_listener/TRTCCloudListener-class.html">TRTCCloudListener</a></span>
  

</dt>
<dd>
  <p>错误回调，表示 SDK 不可恢复的错误，一定要监听并分情况给用户适当的界面提示</p>
<p>参数param：</p>
<p>errCode	错误码</p>
<p>errMsg	错误信息</p>
<p>extraInfo	扩展信息字段，个别错误码可能会带额外的信息帮助定位问题</p> 
  

  <div>
    <span class="signature"><code>const TRTCCloudListener(0)</code></span>
  </div>
</dd>

        <dt id="onExitRoom" class="constant">
  <span class="name ">onExitRoom</span>
  <span class="signature">&#8594; const <a href="../trtc_cloud_listener/TRTCCloudListener-class.html">TRTCCloudListener</a></span>
  

</dt>
<dd>
  <p>离开房间的事件回调</p>
<p>调用 TRTCCloud 中的 exitRoom() 接口会执行退出房间的相关逻辑，例如释放音视频设备资源和编解码器资源等。 待资源释放完毕，SDK 会通过 onExitRoom() 回调通知到您。</p>
<p>如果您要再次调用 enterRoom() 或者切换到其他的音视频 SDK，请等待 onExitRoom() 回调到来之后再执行相关操作。 否则可能会遇到音频设备被占用等各种异常问题。</p>
<p>参数param：</p>
<p>reason	离开房间原因，0：主动调用 exitRoom 退房；1：被服务器踢出当前房间；2：当前房间整个被解散。</p> 
  

  <div>
    <span class="signature"><code>const TRTCCloudListener(3)</code></span>
  </div>
</dd>

        <dt id="onFirstAudioFrame" class="constant">
  <span class="name ">onFirstAudioFrame</span>
  <span class="signature">&#8594; const <a href="../trtc_cloud_listener/TRTCCloudListener-class.html">TRTCCloudListener</a></span>
  

</dt>
<dd>
  <p>开始播放远程用户的首帧音频（本地声音暂不通知）。</p>
<p>参数param：</p>
<p>userId	远程用户 ID。</p> 
  

  <div>
    <span class="signature"><code>const TRTCCloudListener(14)</code></span>
  </div>
</dd>

        <dt id="onFirstVideoFrame" class="constant">
  <span class="name ">onFirstVideoFrame</span>
  <span class="signature">&#8594; const <a href="../trtc_cloud_listener/TRTCCloudListener-class.html">TRTCCloudListener</a></span>
  

</dt>
<dd>
  <p>开始渲染本地或远程用户的首帧画面</p>
<p>如果 userId 为 null，代表开始渲染本地采集的摄像头画面，需要您先调用 startLocalPreview 触发。 如果 userId 不为 null，代表开始渲染远程用户的首帧画面，需要您先调用 startRemoteView 触发。</p>
<p>只有当您调用 startLocalPreview()、startRemoteView() 或 startRemoteSubStreamView() 之后，才会触发该回调。</p>
<p>参数param：</p>
<p>userId	本地或远程用户 ID，如果 userId == null 代表本地，userId != null 代表远程。</p>
<p>streamType	视频流类型：摄像头或屏幕分享。</p>
<p>width	画面宽度</p>
<p>height	画面高度</p> 
  

  <div>
    <span class="signature"><code>const TRTCCloudListener(13)</code></span>
  </div>
</dd>

        <dt id="onMicDidReady" class="constant">
  <span class="name ">onMicDidReady</span>
  <span class="signature">&#8594; const <a href="../trtc_cloud_listener/TRTCCloudListener-class.html">TRTCCloudListener</a></span>
  

</dt>
<dd>
  <p>麦克风准备就绪</p> 
  

  <div>
    <span class="signature"><code>const TRTCCloudListener(24)</code></span>
  </div>
</dd>

        <dt id="onMissCustomCmdMsg" class="constant">
  <span class="name ">onMissCustomCmdMsg</span>
  <span class="signature">&#8594; const <a href="../trtc_cloud_listener/TRTCCloudListener-class.html">TRTCCloudListener</a></span>
  

</dt>
<dd>
  <p>自定义消息丢失回调</p>
<p>实时音视频使用 UDP 通道，即使设置了可靠传输（reliable）也无法确保100%不丢失，只是丢消息概率极低，能满足常规可靠性要求。 在发送端设置了可靠传输（reliable）后，SDK 都会通过此回调通知过去时间段内（通常为5s）传输途中丢失的自定义消息数量统计信息。</p>
<p>注意：</p>
<p>只有在发送端设置了可靠传输（reliable），接收方才能收到消息的丢失回调</p>
<p>参数param：</p>
<p>userId	用户标识</p>
<p>cmdID	数据流 ID</p>
<p>errCode	错误码，当前版本为-1</p>
<p>missed	丢失的消息数量</p> 
  

  <div>
    <span class="signature"><code>const TRTCCloudListener(27)</code></span>
  </div>
</dd>

        <dt id="onMusicObserverComplete" class="constant">
  <span class="name ">onMusicObserverComplete</span>
  <span class="signature">&#8594; const <a href="../trtc_cloud_listener/TRTCCloudListener-class.html">TRTCCloudListener</a></span>
  

</dt>
<dd>
  <p>背景音乐已播放完毕</p> 
  

  <div>
    <span class="signature"><code>const TRTCCloudListener(36)</code></span>
  </div>
</dd>

        <dt id="onMusicObserverPlayProgress" class="constant">
  <span class="name ">onMusicObserverPlayProgress</span>
  <span class="signature">&#8594; const <a href="../trtc_cloud_listener/TRTCCloudListener-class.html">TRTCCloudListener</a></span>
  

</dt>
<dd>
  <p>背景音乐的播放进度</p> 
  

  <div>
    <span class="signature"><code>const TRTCCloudListener(35)</code></span>
  </div>
</dd>

        <dt id="onMusicObserverStart" class="constant">
  <span class="name ">onMusicObserverStart</span>
  <span class="signature">&#8594; const <a href="../trtc_cloud_listener/TRTCCloudListener-class.html">TRTCCloudListener</a></span>
  

</dt>
<dd>
  <p>背景音乐开始播放</p> 
  

  <div>
    <span class="signature"><code>const TRTCCloudListener(34)</code></span>
  </div>
</dd>

        <dt id="onNetworkQuality" class="constant">
  <span class="name ">onNetworkQuality</span>
  <span class="signature">&#8594; const <a href="../trtc_cloud_listener/TRTCCloudListener-class.html">TRTCCloudListener</a></span>
  

</dt>
<dd>
  <p>网络质量：该回调每2秒触发一次，统计当前网络的上行和下行质量。</p>
<p>userId 为本地用户 ID 代表自己当前的视频质量</p>
<p>参数param：</p>
<p>localQuality	上行网络质量</p>
<p>remoteQuality	下行网络质量</p> 
  

  <div>
    <span class="signature"><code>const TRTCCloudListener(17)</code></span>
  </div>
</dd>

        <dt id="onRecvCustomCmdMsg" class="constant">
  <span class="name ">onRecvCustomCmdMsg</span>
  <span class="signature">&#8594; const <a href="../trtc_cloud_listener/TRTCCloudListener-class.html">TRTCCloudListener</a></span>
  

</dt>
<dd>
  <p>收到自定义消息回调</p>
<p>当房间中的某个用户使用 sendCustomCmdMsg 发送自定义消息时，房间中的其它用户可以通过 onRecvCustomCmdMsg 接口接收消息</p>
<p>参数param：</p>
<p>userId	用户标识</p>
<p>cmdID	命令 ID</p>
<p>seq	消息序号</p>
<p>message	消息数据</p> 
  

  <div>
    <span class="signature"><code>const TRTCCloudListener(26)</code></span>
  </div>
</dd>

        <dt id="onRecvSEIMsg" class="constant">
  <span class="name ">onRecvSEIMsg</span>
  <span class="signature">&#8594; const <a href="../trtc_cloud_listener/TRTCCloudListener-class.html">TRTCCloudListener</a></span>
  

</dt>
<dd>
  <p>收到 SEI 消息的回调</p>
<p>当房间中的某个用户使用 sendSEIMsg 发送数据时，房间中的其它用户可以通过 onRecvSEIMsg 接口接收数据。</p>
<p>参数param：</p>
<p>userId	用户标识</p>
<p>message	数据</p> 
  

  <div>
    <span class="signature"><code>const TRTCCloudListener(28)</code></span>
  </div>
</dd>

        <dt id="onRemoteUserEnterRoom" class="constant">
  <span class="name ">onRemoteUserEnterRoom</span>
  <span class="signature">&#8594; const <a href="../trtc_cloud_listener/TRTCCloudListener-class.html">TRTCCloudListener</a></span>
  

</dt>
<dd>
  <p>有用户加入当前房间。</p>
<p>出于性能方面的考虑，在两种不同的应用场景下，该通知的行为会有差别：</p>
<p>通话场景（TRTCCloudDef.TRTC_APP_SCENE_VIDEOCALL 和 TRTCCloudDef.TRTC_APP_SCENE_AUDIOCALL）：该场景下用户没有角色的区别，任何用户进入房间都会触发该通知。</p>
<p>直播场景（TRTCCloudDef.TRTC_APP_SCENE_LIVE 和 TRTCCloudDef.TRTC_APP_SCENE_VOICE_CHATROOM）：该场景不限制观众的数量，如果任何用户进出都抛出回调会引起很大的性能损耗，所以该场景下只有主播进入房间时才会触发该通知，观众进入房间不会触发该通知。</p>
<p>参数param：</p>
<p>userId	用户标识</p> 
  

  <div>
    <span class="signature"><code>const TRTCCloudListener(5)</code></span>
  </div>
</dd>

        <dt id="onRemoteUserLeaveRoom" class="constant">
  <span class="name ">onRemoteUserLeaveRoom</span>
  <span class="signature">&#8594; const <a href="../trtc_cloud_listener/TRTCCloudListener-class.html">TRTCCloudListener</a></span>
  

</dt>
<dd>
  <p>有用户离开当前房间。</p>
<p>与 onRemoteUserEnterRoom 相对应，在两种不同的应用场景下，该通知的行为会有差别：</p>
<p>通话场景（TRTCCloudDef.TRTC_APP_SCENE_VIDEOCALL 和 TRTCCloudDef.TRTC_APP_SCENE_AUDIOCALL）：该场景下用户没有角色的区别，任何用户的离开都会触发该通知。</p>
<p>直播场景（TRTCCloudDef.TRTC_APP_SCENE_LIVE 和 TRTCCloudDef.TRTC_APP_SCENE_VOICE_CHATROOM）：只有主播离开房间时才会触发该通知，观众离开房间不会触发该通知。</p>
<p>参数param：</p>
<p>userId	用户标识</p>
<p>reason	离开原因，0表示用户主动退出房间，1表示用户超时退出，2表示被踢出房间。</p> 
  

  <div>
    <span class="signature"><code>const TRTCCloudListener(6)</code></span>
  </div>
</dd>

        <dt id="onScreenCapturePaused" class="constant">
  <span class="name ">onScreenCapturePaused</span>
  <span class="signature">&#8594; const <a href="../trtc_cloud_listener/TRTCCloudListener-class.html">TRTCCloudListener</a></span>
  

</dt>
<dd>
  <p>当屏幕分享暂停时，SDK 会通过此回调通知</p>
<p>参数</p>
<p>reason	原因，0：用户主动暂停；1：屏幕窗口不可见暂停</p>
<p>注意：回调的值只针对ios生效</p> 
  

  <div>
    <span class="signature"><code>const TRTCCloudListener(39)</code></span>
  </div>
</dd>

        <dt id="onScreenCaptureResumed" class="constant">
  <span class="name ">onScreenCaptureResumed</span>
  <span class="signature">&#8594; const <a href="../trtc_cloud_listener/TRTCCloudListener-class.html">TRTCCloudListener</a></span>
  

</dt>
<dd>
  <p>当屏幕分享恢复时，SDK 会通过此回调通知</p>
<p>参数</p>
<p>reason	恢复原因，0：用户主动恢复；1：屏幕窗口恢复可见从而恢复分享</p>
<p>注意：回调的值只针对ios生效</p> 
  

  <div>
    <span class="signature"><code>const TRTCCloudListener(40)</code></span>
  </div>
</dd>

        <dt id="onScreenCaptureStarted" class="constant">
  <span class="name ">onScreenCaptureStarted</span>
  <span class="signature">&#8594; const <a href="../trtc_cloud_listener/TRTCCloudListener-class.html">TRTCCloudListener</a></span>
  

</dt>
<dd>
  <p>当屏幕分享开始时，SDK 会通过此回调通知</p> 
  

  <div>
    <span class="signature"><code>const TRTCCloudListener(38)</code></span>
  </div>
</dd>

        <dt id="onScreenCaptureStoped" class="constant">
  <span class="name ">onScreenCaptureStoped</span>
  <span class="signature">&#8594; const <a href="../trtc_cloud_listener/TRTCCloudListener-class.html">TRTCCloudListener</a></span>
  

</dt>
<dd>
  <p>当屏幕分享停止时，SDK 会通过此回调通知</p>
<p>参数</p>
<p>reason	停止原因，0：用户主动停止；1：屏幕窗口关闭导致停止</p> 
  

  <div>
    <span class="signature"><code>const TRTCCloudListener(41)</code></span>
  </div>
</dd>

        <dt id="onSendFirstLocalAudioFrame" class="constant">
  <span class="name ">onSendFirstLocalAudioFrame</span>
  <span class="signature">&#8594; const <a href="../trtc_cloud_listener/TRTCCloudListener-class.html">TRTCCloudListener</a></span>
  

</dt>
<dd>
  <p>首帧本地音频数据已经被送出</p>
<p>SDK 会在 enterRoom() 并 startLocalAudio() 成功后开始麦克风采集，并将采集到的声音进行编码。 当 SDK 成功向云端送出第一帧音频数据后，会抛出这个回调事件。</p> 
  

  <div>
    <span class="signature"><code>const TRTCCloudListener(16)</code></span>
  </div>
</dd>

        <dt id="onSendFirstLocalVideoFrame" class="constant">
  <span class="name ">onSendFirstLocalVideoFrame</span>
  <span class="signature">&#8594; const <a href="../trtc_cloud_listener/TRTCCloudListener-class.html">TRTCCloudListener</a></span>
  

</dt>
<dd>
  <p>首帧本地音频数据已经被送出。</p>
<p>SDK 会在 enterRoom() 并 startLocalPreview() 成功后开始摄像头采集，并将采集到的画面进行编码。 当 SDK 成功向云端送出第一帧视频数据后，会抛出这个回调事件。</p>
<p>参数param：</p>
<p>streamType	视频流类型，大画面、小画面或辅流画面（屏幕分享）</p> 
  

  <div>
    <span class="signature"><code>const TRTCCloudListener(15)</code></span>
  </div>
</dd>

        <dt id="onSetMixTranscodingConfig" class="constant">
  <span class="name ">onSetMixTranscodingConfig</span>
  <span class="signature">&#8594; const <a href="../trtc_cloud_listener/TRTCCloudListener-class.html">TRTCCloudListener</a></span>
  

</dt>
<dd>
  <p>设置云端的混流转码参数的回调，对应于 TRTCCloud 中的 setMixTranscodingConfig() 接口。</p>
<p>参数param：</p>
<p>errCode	0表示成功，其余值表示失败</p>
<p>errMsg	具体错误原因</p> 
  

  <div>
    <span class="signature"><code>const TRTCCloudListener(33)</code></span>
  </div>
</dd>

        <dt id="onSnapshotComplete" class="constant">
  <span class="name ">onSnapshotComplete</span>
  <span class="signature">&#8594; const <a href="../trtc_cloud_listener/TRTCCloudListener-class.html">TRTCCloudListener</a></span>
  

</dt>
<dd>
  <p>截图完成时回调</p>
<p>参数</p>
<p>errorCode为0表示截图成功，其他值表示失败</p> 
  

  <div>
    <span class="signature"><code>const TRTCCloudListener(37)</code></span>
  </div>
</dd>

        <dt id="onSpeedTest" class="constant">
  <span class="name ">onSpeedTest</span>
  <span class="signature">&#8594; const <a href="../trtc_cloud_listener/TRTCCloudListener-class.html">TRTCCloudListener</a></span>
  

</dt>
<dd>
  <p>服务器测速的回调，SDK 对多个服务器 IP 做测速，每个 IP 的测速结果通过这个回调通知。</p>
<p>参数param：</p>
<p>currentResult	当前完成的测速结果</p>
<p>finishedCount	已完成测速的服务器数量</p>
<p>totalCount	需要测速的服务器总数量</p> 
  

  <div>
    <span class="signature"><code>const TRTCCloudListener(22)</code></span>
  </div>
</dd>

        <dt id="onStartPublishCDNStream" class="constant">
  <span class="name ">onStartPublishCDNStream</span>
  <span class="signature">&#8594; const <a href="../trtc_cloud_listener/TRTCCloudListener-class.html">TRTCCloudListener</a></span>
  

</dt>
<dd>
  <p>启动旁路推流到 CDN 完成的回调</p>
<p>对应于 TRTCCloud 中的 startPublishCDNStream() 接口</p>
<p>注意：Start 回调如果成功，只能说明转推请求已经成功告知给腾讯云，如果目标 CDN 有异常，还是有可能会转推失败。</p>
<p>参数param：</p>
<p>errCode	0表示成功，其余值表示失败</p>
<p>errMsg	具体错误原因</p> 
  

  <div>
    <span class="signature"><code>const TRTCCloudListener(31)</code></span>
  </div>
</dd>

        <dt id="onStartPublishing" class="constant">
  <span class="name ">onStartPublishing</span>
  <span class="signature">&#8594; const <a href="../trtc_cloud_listener/TRTCCloudListener-class.html">TRTCCloudListener</a></span>
  

</dt>
<dd>
  <p>开始向腾讯云的直播 CDN 推流的回调，对应于 TRTCCloud 中的 startPublishing() 接口</p>
<p>参数param：</p>
<p>errCode	0表示成功，其余值表示失败</p>
<p>errMsg	具体错误原因</p> 
  

  <div>
    <span class="signature"><code>const TRTCCloudListener(29)</code></span>
  </div>
</dd>

        <dt id="onStatistics" class="constant">
  <span class="name ">onStatistics</span>
  <span class="signature">&#8594; const <a href="../trtc_cloud_listener/TRTCCloudListener-class.html">TRTCCloudListener</a></span>
  

</dt>
<dd>
  <p>技术指标统计回调</p>
<p>如果您是熟悉音视频领域相关术语，可以通过这个回调获取 SDK 的所有技术指标。 如果您是首次开发音视频相关项目，可以只关注 onNetworkQuality 回调。</p>
<p>注意：每2秒回调一次</p>
<p>参数param：</p>
<p>statics	状态数据</p> 
  

  <div>
    <span class="signature"><code>const TRTCCloudListener(18)</code></span>
  </div>
</dd>

        <dt id="onStopPublishCDNStream" class="constant">
  <span class="name ">onStopPublishCDNStream</span>
  <span class="signature">&#8594; const <a href="../trtc_cloud_listener/TRTCCloudListener-class.html">TRTCCloudListener</a></span>
  

</dt>
<dd>
  <p>停止旁路推流到 CDN 完成的回调</p>
<p>对应于 TRTCCloud 中的 stopPublishCDNStream() 接口</p>
<p>参数param：</p>
<p>errCode	0表示成功，其余值表示失败</p>
<p>errMsg	具体错误原因</p> 
  

  <div>
    <span class="signature"><code>const TRTCCloudListener(32)</code></span>
  </div>
</dd>

        <dt id="onStopPublishing" class="constant">
  <span class="name ">onStopPublishing</span>
  <span class="signature">&#8594; const <a href="../trtc_cloud_listener/TRTCCloudListener-class.html">TRTCCloudListener</a></span>
  

</dt>
<dd>
  <p>停止向腾讯云的直播 CDN 推流的回调，对应于 TRTCCloud 中的 stopPublishing() 接口</p>
<p>参数param：</p>
<p>errCode	0表示成功，其余值表示失败</p>
<p>errMsg	具体错误原因</p> 
  

  <div>
    <span class="signature"><code>const TRTCCloudListener(30)</code></span>
  </div>
</dd>

        <dt id="onSwitchRole" class="constant">
  <span class="name ">onSwitchRole</span>
  <span class="signature">&#8594; const <a href="../trtc_cloud_listener/TRTCCloudListener-class.html">TRTCCloudListener</a></span>
  

</dt>
<dd>
  <p>切换角色的事件回调</p>
<p>调用 TRTCCloud 中的 switchRole() 接口会切换主播和观众的角色，该操作会伴随一个线路切换的过程， 待 SDK 切换完成后，会抛出 onSwitchRole() 事件回调。</p>
<p>参数param：</p>
<p>errCode	错误码，0代表切换成功</p>
<p>errMsg	错误信息。</p> 
  

  <div>
    <span class="signature"><code>const TRTCCloudListener(4)</code></span>
  </div>
</dd>

        <dt id="onSwitchRoom" class="constant">
  <span class="name ">onSwitchRoom</span>
  <span class="signature">&#8594; const <a href="../trtc_cloud_listener/TRTCCloudListener-class.html">TRTCCloudListener</a></span>
  

</dt>
<dd>
  <p>切换房间 (switchRoom) 的结果回调</p>
<p>参数param：</p>
<p>errCode 错误码</p>
<p>errMsg 错误信息</p> 
  

  <div>
    <span class="signature"><code>const TRTCCloudListener(9)</code></span>
  </div>
</dd>

        <dt id="onTestMicVolume" class="constant">
  <span class="name ">onTestMicVolume</span>
  <span class="signature">&#8594; const <a href="../trtc_cloud_listener/TRTCCloudListener-class.html">TRTCCloudListener</a></span>
  

</dt>
<dd>
  <p>麦克风测试音量回调</p>
<p>麦克风测试接口 startMicDeviceTest 会触发这个回调</p>
<p>注意：该回调仅支持windows和Mac平台</p>
<p>参数：</p>
<p>volume 音量值，取值范围0 - 100</p> 
  

  <div>
    <span class="signature"><code>const TRTCCloudListener(43)</code></span>
  </div>
</dd>

        <dt id="onTestSpeakerVolume" class="constant">
  <span class="name ">onTestSpeakerVolume</span>
  <span class="signature">&#8594; const <a href="../trtc_cloud_listener/TRTCCloudListener-class.html">TRTCCloudListener</a></span>
  

</dt>
<dd>
  <p>扬声器测试音量回调</p>
<p>扬声器测试接口 startSpeakerDeviceTest 会触发这个回调</p>
<p>注意：该回调仅支持windows和Mac平台</p>
<p>参数：</p>
<p>volume 音量值，取值范围0 - 100</p> 
  

  <div>
    <span class="signature"><code>const TRTCCloudListener(44)</code></span>
  </div>
</dd>

        <dt id="onTryToReconnect" class="constant">
  <span class="name ">onTryToReconnect</span>
  <span class="signature">&#8594; const <a href="../trtc_cloud_listener/TRTCCloudListener-class.html">TRTCCloudListener</a></span>
  

</dt>
<dd>
  <p>SDK 尝试重新连接到服务器。</p> 
  

  <div>
    <span class="signature"><code>const TRTCCloudListener(20)</code></span>
  </div>
</dd>

        <dt id="onUserAudioAvailable" class="constant">
  <span class="name ">onUserAudioAvailable</span>
  <span class="signature">&#8594; const <a href="../trtc_cloud_listener/TRTCCloudListener-class.html">TRTCCloudListener</a></span>
  

</dt>
<dd>
  <p>远端用户是否存在可播放的音频数据</p>
<p>参数param：</p>
<p>userId	用户标识</p>
<p>available	声音是否开启</p> 
  

  <div>
    <span class="signature"><code>const TRTCCloudListener(12)</code></span>
  </div>
</dd>

        <dt id="onUserSubStreamAvailable" class="constant">
  <span class="name ">onUserSubStreamAvailable</span>
  <span class="signature">&#8594; const <a href="../trtc_cloud_listener/TRTCCloudListener-class.html">TRTCCloudListener</a></span>
  

</dt>
<dd>
  <p>远端用户是否存在可播放的辅路画面（一般用于屏幕分享）</p>
<p>参数param：</p>
<p>userId	用户标识</p>
<p>available	屏幕分享是否开启</p> 
  

  <div>
    <span class="signature"><code>const TRTCCloudListener(11)</code></span>
  </div>
</dd>

        <dt id="onUserVideoAvailable" class="constant">
  <span class="name ">onUserVideoAvailable</span>
  <span class="signature">&#8594; const <a href="../trtc_cloud_listener/TRTCCloudListener-class.html">TRTCCloudListener</a></span>
  

</dt>
<dd>
  <p>远端用户是否存在可播放的主路画面（一般用于摄像头）</p>
<p>当您收到 onUserVideoAvailable(userId, true) 通知时，表示该路画面已经有可用的视频数据帧到达。 此时，您需要调用 startRemoteView(userid) 接口加载该用户的远程画面。 然后，您会收到名为 onFirstVideoFrame(userid) 的首帧画面渲染回调。</p>
<p>当您收到 onUserVideoAvailable(userId, false) 通知时，表示该路远程画面已经被关闭，可能由于该用户调用了 muteLocalVideo() 或 stopLocalPreview()。</p>
<p>参数param：</p>
<p>userId	用户标识</p>
<p>available	画面是否开启</p> 
  

  <div>
    <span class="signature"><code>const TRTCCloudListener(10)</code></span>
  </div>
</dd>

        <dt id="onUserVoiceVolume" class="constant">
  <span class="name ">onUserVoiceVolume</span>
  <span class="signature">&#8594; const <a href="../trtc_cloud_listener/TRTCCloudListener-class.html">TRTCCloudListener</a></span>
  

</dt>
<dd>
  <p>用于提示音量大小的回调，包括每个 userId 的音量和远端总音量。</p>
<p>您可以通过调用 TRTCCloud 中的 enableAudioVolumeEvaluation 接口来开关这个回调或者设置它的触发间隔。 需要注意的是，调用 enableAudioVolumeEvaluation 开启音量回调后，无论频道内是否有人说话，都会按设置的时间间隔调用这个回调; 如果没有人说话，则 userVolumes 为空，totalVolume 为0。</p>
<p>注意：userId 为本地用户 ID 时表示自己的音量，userVolumes 内仅包含正在说话（音量不为0）的用户音量信息。</p>
<p>参数param：</p>
<p>userVolumes	所有正在说话的房间成员的音量，取值范围0 - 100。</p>
<p>totalVolume	所有远端成员的总音量, 取值范围0 - 100。</p> 
  

  <div>
    <span class="signature"><code>const TRTCCloudListener(25)</code></span>
  </div>
</dd>

        <dt id="onWarning" class="constant">
  <span class="name ">onWarning</span>
  <span class="signature">&#8594; const <a href="../trtc_cloud_listener/TRTCCloudListener-class.html">TRTCCloudListener</a></span>
  

</dt>
<dd>
  <p>警告回调，用于告知您一些非严重性问题，例如出现卡顿或者可恢复的解码失败。</p>
<p>参数param：</p>
<p>warningCode	错误码</p>
<p>warningMsg	警告信息</p>
<p>extraInfo	扩展信息字段，个别警告码可能会带额外的信息帮助定位问题</p> 
  

  <div>
    <span class="signature"><code>const TRTCCloudListener(1)</code></span>
  </div>
</dd>

        <dt id="values" class="constant">
  <span class="name ">values</span>
  <span class="signature">&#8594; const <a href="https://api.flutter.dev/flutter/dart-core/List-class.html">List</a><span class="signature">&lt;<wbr><span class="type-parameter"><a href="../trtc_cloud_listener/TRTCCloudListener-class.html">TRTCCloudListener</a></span>&gt;</span></span>
  

</dt>
<dd>
  <p>A constant List of the values in this enum, in order of their declaration.</p> 
  

  <div>
    <span class="signature"><code>const List&lt;<wbr><span class="type-parameter">TRTCCloudListener</span>&gt;</code></span>
  </div>
</dd>

      </dl>
    </section>


    <section class="summary offset-anchor" id="instance-properties">
      <h2>Properties</h2>

      <dl class="properties">
        <dt id="hashCode" class="property inherited">
  <span class="name"><a href="https://api.flutter.dev/flutter/dart-core/Object/hashCode.html">hashCode</a></span>
  <span class="signature">&#8594; <a href="https://api.flutter.dev/flutter/dart-core/int-class.html">int</a></span> 

</dt>
<dd class="inherited">
  The hash code for this object. <a href="https://api.flutter.dev/flutter/dart-core/Object/hashCode.html">[...]</a>
  <div class="features">read-only, inherited</div>

</dd>

        <dt id="index" class="property">
  <span class="name">index</span>
  <span class="signature">&#8594; <a href="https://api.flutter.dev/flutter/dart-core/int-class.html">int</a></span> 

</dt>
<dd>
  <p>The integer index of this enum.</p> 
  <div class="features">final</div>

</dd>

        <dt id="runtimeType" class="property inherited">
  <span class="name"><a href="https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html">runtimeType</a></span>
  <span class="signature">&#8594; <a href="https://api.flutter.dev/flutter/dart-core/Type-class.html">Type</a></span> 

</dt>
<dd class="inherited">
  A representation of the runtime type of the object. 
  <div class="features">read-only, inherited</div>

</dd>

      </dl>
    </section>

    <section class="summary offset-anchor" id="instance-methods">
      <h2>Methods</h2>
      <dl class="callables">
        <dt id="noSuchMethod" class="callable inherited">
  <span class="name"><a href="https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html">noSuchMethod</a></span><span class="signature">(<wbr><span class="parameter" id="noSuchMethod-param-invocation"><span class="type-annotation"><a href="https://api.flutter.dev/flutter/dart-core/Invocation-class.html">Invocation</a></span> <span class="parameter-name">invocation</span></span>)
    <span class="returntype parameter">&#8594; dynamic</span>
  </span>
  

</dt>
<dd class="inherited">
  Invoked when a non-existent method or property is accessed. <a href="https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html">[...]</a>
  <div class="features">inherited</div>

</dd>

        <dt id="toString" class="callable">
  <span class="name"><a href="../trtc_cloud_listener/TRTCCloudListener/toString.html">toString</a></span><span class="signature">(<wbr>)
    <span class="returntype parameter">&#8594; <a href="https://api.flutter.dev/flutter/dart-core/String-class.html">String</a></span>
  </span>
  

</dt>
<dd>
  A string representation of this object. <a href="../trtc_cloud_listener/TRTCCloudListener/toString.html">[...]</a>
  <div class="features">override</div>

</dd>

      </dl>
    </section>

    <section class="summary offset-anchor inherited" id="operators">
      <h2>Operators</h2>
      <dl class="callables">
        <dt id="operator ==" class="callable inherited">
  <span class="name"><a href="https://api.flutter.dev/flutter/dart-core/Object/operator_equals.html">operator ==</a></span><span class="signature">(<wbr><span class="parameter" id="==-param-other"><span class="type-annotation"><a href="https://api.flutter.dev/flutter/dart-core/Object-class.html">Object</a></span> <span class="parameter-name">other</span></span>)
    <span class="returntype parameter">&#8594; <a href="https://api.flutter.dev/flutter/dart-core/bool-class.html">bool</a></span>
  </span>
  

</dt>
<dd class="inherited">
  The equality operator. <a href="https://api.flutter.dev/flutter/dart-core/Object/operator_equals.html">[...]</a>
  <div class="features">inherited</div>

</dd>

      </dl>
    </section>


  </div> <!-- /.main-content -->

  <div id="dartdoc-sidebar-left" class="sidebar sidebar-offcanvas-left">
    <header id="header-search-sidebar" class="hidden-l">
  <form class="search-sidebar" role="search">
    <input type="text" id="search-sidebar" autocomplete="off" disabled class="form-control typeahead" placeholder="Loading search...">
  </form>
</header>

<ol class="breadcrumbs gt-separated dark hidden-l" id="sidebar-nav">
  <li><a href="../index.html">tencent_trtc_cloud</a></li>
  <li><a href="../trtc_cloud_listener/trtc_cloud_listener-library.html">trtc_cloud_listener</a></li>
  <li class="self-crumb">TRTCCloudListener enum</li>
</ol>


    <h5>trtc_cloud_listener library</h5>
    <ol>






  <li class="section-title"><a href="../trtc_cloud_listener/trtc_cloud_listener-library.html#enums">Enums</a></li>
  <li><a href="../trtc_cloud_listener/TRTCCloudListener-class.html">TRTCCloudListener</a></li>


</ol>

  </div>

  <div id="dartdoc-sidebar-right" class="sidebar sidebar-offcanvas-right">
    <ol>


    <li class="section-title"><a href="../trtc_cloud_listener/TRTCCloudListener-class.html#constants">Constants</a></li>
    <li>onCameraDidReady</li>
    <li>onConnectionLost</li>
    <li>onConnectionRecovery</li>
    <li>onConnectOtherRoom</li>
    <li>onDeviceChange</li>
    <li>onDisConnectOtherRoom</li>
    <li>onEnterRoom</li>
    <li>onError</li>
    <li>onExitRoom</li>
    <li>onFirstAudioFrame</li>
    <li>onFirstVideoFrame</li>
    <li>onMicDidReady</li>
    <li>onMissCustomCmdMsg</li>
    <li>onMusicObserverComplete</li>
    <li>onMusicObserverPlayProgress</li>
    <li>onMusicObserverStart</li>
    <li>onNetworkQuality</li>
    <li>onRecvCustomCmdMsg</li>
    <li>onRecvSEIMsg</li>
    <li>onRemoteUserEnterRoom</li>
    <li>onRemoteUserLeaveRoom</li>
    <li>onScreenCapturePaused</li>
    <li>onScreenCaptureResumed</li>
    <li>onScreenCaptureStarted</li>
    <li>onScreenCaptureStoped</li>
    <li>onSendFirstLocalAudioFrame</li>
    <li>onSendFirstLocalVideoFrame</li>
    <li>onSetMixTranscodingConfig</li>
    <li>onSnapshotComplete</li>
    <li>onSpeedTest</li>
    <li>onStartPublishCDNStream</li>
    <li>onStartPublishing</li>
    <li>onStatistics</li>
    <li>onStopPublishCDNStream</li>
    <li>onStopPublishing</li>
    <li>onSwitchRole</li>
    <li>onSwitchRoom</li>
    <li>onTestMicVolume</li>
    <li>onTestSpeakerVolume</li>
    <li>onTryToReconnect</li>
    <li>onUserAudioAvailable</li>
    <li>onUserSubStreamAvailable</li>
    <li>onUserVideoAvailable</li>
    <li>onUserVoiceVolume</li>
    <li>onWarning</li>
    <li>values</li>

    <li class="section-title">
      <a href="../trtc_cloud_listener/TRTCCloudListener-class.html#instance-properties">Properties</a>
    </li>
    <li class="inherited"><a href="https://api.flutter.dev/flutter/dart-core/Object/hashCode.html">hashCode</a></li>
    <li>index</li>
    <li class="inherited"><a href="https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html">runtimeType</a></li>

    <li class="section-title"><a href="../trtc_cloud_listener/TRTCCloudListener-class.html#instance-methods">Methods</a></li>
    <li class="inherited"><a href="https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html">noSuchMethod</a></li>
    <li><a href="../trtc_cloud_listener/TRTCCloudListener/toString.html">toString</a></li>

    <li class="section-title inherited"><a href="../trtc_cloud_listener/TRTCCloudListener-class.html#operators">Operators</a></li>
    <li class="inherited"><a href="https://api.flutter.dev/flutter/dart-core/Object/operator_equals.html">operator ==</a></li>


</ol>

  </div><!--/.sidebar-offcanvas-->

</main>

<footer>
  <span class="no-break">
    tencent_trtc_cloud
      1.2.4
  </span>

  
</footer>



<script src="../static-assets/highlight.pack.js?v1"></script>
<script src="../static-assets/script.js?v1"></script>



</body>

</html>

